package cn.zs.supply.common.utils;


import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;

public class SignServiceMessage implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	public static final String SUCCESS = "0";
	
	public final Map<String, Object> params = new HashMap<>();
	
	private JSONObject reqJson;
	
	private JSONObject repJson;
	
	public void addParam(String key, Object value) {
		if(value==null) {value="";}
		this.params.put(key, value);
	}
	
	@SuppressWarnings("unchecked")
	public <T> T get(String key, Class<T> t) {
		return (T) params.get(key);
	}

	public JSONObject getReqJson() {
		return reqJson;
	}

	public void setReqJson(JSONObject reqJson) {
		this.reqJson = reqJson;
	}

	public JSONObject getRepJson() {
		return repJson;
	}

	public void setRepJson(JSONObject repJson) {
		this.repJson = repJson;
	}

	public void clearJsonData() {
		this.reqJson = null;
		this.repJson = null;
	}
}
